import java.net.InetAddress;

public class ClientMessageSender{
	NetworkSender ns;
	InetAddress serverip;
	InetAddress myip;

	public ClientMessageSender(NetworkSender ns1, InetAddress serverip, InetAddress myIp){
		ns = ns1;
		this.serverip = serverip;
		myip = myIp;
	}
	public void playerMove(int id , int x, int y){
		ns.send(new ClientPlayerMoveMessage(id,x,y),serverip);
	}
	public void playerAbility(int id, int type, int targetX, int targetY){
		ns.send(new ClientPlayerUseAbilityMessage(id, type, targetX, targetY), serverip);
	}
	public void playerLogin(int id, String name){
		ns.send(new ClientPlayerLoginMessage(id, name, 0, myip),serverip);
	}
	public void playerLogoff(int id, String name){
		ns.send(new ClientPlayerLogoffMessage(id, name),serverip);
	}
}
